package com.ly.lyyudao.web.controller;

import com.ly.lyyudao.domain.vo.AuthLoginReqVO;
import com.ly.lyyudao.domain.vo.AuthLoginRespVO;
import com.ly.lyyudao.domain.vo.ResponseResult;
import com.ly.lyyudao.service.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @auth wzy
 * @date 2024/5/6 17:16
 */
@RestController
@RequestMapping("/admin-api/system/auth")
public class AuthController {

    @Autowired
    private AuthService authService;

    @PostMapping("/login")
    public ResponseResult<AuthLoginRespVO> doLogin(@RequestBody @Valid AuthLoginReqVO authLoginReqVO){

        return authService.login(authLoginReqVO);
    }
}
